<?php


# Created on: 2011-12-17 11:54:08 131

/**
* Assign sizes for an image
*/

$images = new images();

/*
Array
(
    [0] => 4
    [1] => 16
    [2] => 9
)
Array
(
    [sizes] => Array
        (
            [0] => 4
            [1] => 16
            [2] => 9
        )

    [image_id] => 96
    [code] => 38a7bbd1ee14196cc2dddb74ebd1a1c2
    [add-sizes] => Assign sizes
)
*/
$image_id = $variable->post('image_id', 'integer', 0);
$sizes = $variable->validate_integers($variable->post('sizes', 'array', array()));
$assigned_sizes_counter = $images->sizes_reassign($image_id, $sizes);
#echo $assigned_sizes_counter.' sizes assigned.';
#print_r($sizes);
#print_r($_POST);

# images-details.php?id=4&code=386dbae1a93cc91975fa43d970bd53af
headers::back('images-list.php');
?>